<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('采集数据点位列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            
                            <li>
                                <label>点位名称：</label>
                                <input type="text" name="Description"/>
                            </li>
                            <!-- 
                            <li>
                                <label>点位ID：</label>
                                <input type="text" name="SourceTag"/>
                            </li>
                            <li>
                                <label>采集时间：</label>
                                <input type="text" class="time-input" placeholder="请选择采集时间" name="TimeStam"/>
                            </li>
                            <li>
                                <label>读取时间：</label>
                                <input type="text" class="time-input" placeholder="请选择读取时间" name="FomatedTime"/>
                            </li>
                            <li>
                                <label>采集值：</label>
                                <input type="text" name="Value"/>
                            </li>
                            <li>
                                <label>连接方式ID：</label>
                                <input type="text" name="ljfs_id"/>
                            </li>
                            <li>
                                <label>最大值：</label>
                                <input type="text" name="Max_value"/>
                            </li>
                            <li>
                                <label>最小值：</label>
                                <input type="text" name="Min_value"/>
                            </li>
                            <li>
                                <label>父点位代码：</label>
                                <input type="text" name="fdwdm"/>
                            </li>
                            <li>
                                <label>父点位名称：</label>
                                <input type="text" name="fdwdm_name"/>
                            </li>
                            <li>
                                <label>故障模型ID：</label>
                                <input type="text" name="gzmx_id"/>
                            </li>
                            <li>
                                <label>二级单位ID：</label>
                                <input type="text" name="ejdw_id"/>
                            </li>
                            <li>
                                <label>二级单位名称：</label>
                                <input type="text" name="ejdw_name"/>
                            </li>
                            <li>
                                <label>作业区ID：</label>
                                <input type="text" name="zyq_id"/>
                            </li>
                            <li>
                                <label>作业区名称：</label>
                                <input type="text" name="zyq_name"/>
                            </li>
                            <li>
                                <label>点位3级ID：</label>
                                <input type="text" name="dw_3_id"/>
                            </li>
                            <li>
                                <label>点位3级名称：</label>
                                <input type="text" name="dw_3_name"/>
                            </li>
                            <li>
                                <label>点位4级ID：</label>
                                <input type="text" name="dw_4_id"/>
                            </li>
                            <li>
                                <label>点位4级名称：</label>
                                <input type="text" name="dw_4_name"/>
                            </li>
                            <li>
                                <label>点位5级ID：</label>
                                <input type="text" name="dw_5_id"/>
                            </li>
                            <li>
                                <label>点位5级名称：</label>
                                <input type="text" name="dw_5_name"/>
                            </li>
                            <li>
                                <label>单位ID：</label>
                                <input type="text" name="deptId"/>
                            </li>
                             -->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="gzmx_tag:gzmx_tag:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="gzmx_tag:gzmx_tag:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="gzmx_tag:gzmx_tag:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="gzmx_tag:gzmx_tag:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('gzmx_tag:gzmx_tag:edit')}]];
        var removeFlag = [[${@permission.hasPermi('gzmx_tag:gzmx_tag:remove')}]];
        var prefix = ctx + "gzmx_tag/gzmx_tag";

        $(function() {
        	//alert([[${gzmx_scdw.id}]]);
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add/"+[[${gzmx_scdw.id}]],
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "采集数据点位",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '采集点位ID',
                    visible: false
                },
                {
                    field: 'sourcetag',
                    title: '点位ID'
                },
                {
                    field: 'description',
                    title: '点位名称'
                },
                {
                    field: 'timestam',
                    title: '采集时间',
                    visible: false
                },
                {
                    field: 'fomatedtime',
                    title: '读取时间',
                    visible: false
                },
                {
                    field: 'value',
                    title: '采集值',
                    visible: false
                },
                {
                    field: 'sj_dj',
                    title: '数据等级'
                },
                {
                    field: 'ljfs_id',
                    title: '连接方式ID',
                    visible: false
                },
                {
                    field: 'ljfs_name',
                    title: '连接方式名称'
                },
                {
                    field: 'ljfs_lx',
                    title: '连接方式类型'
                },
                {
                    field: 'max_value',
                    title: '最大值'
                },
                {
                    field: 'min_value',
                    title: '最小值'
                },
                {
                    field: 'fdwdm',
                    title: '父点位代码',
                    visible: false
                },
                {
                    field: 'fdwdm_name',
                    title: '父点位名称',
                    visible: false
                },
                {
                    field: 'gzmx_id',
                    title: '故障模型ID',
                    visible: false
                },
                {
                    field: 'gzmx_name',
                    title: '故障模型名称'
                },
                {
                    field: 'ejdw_id',
                    title: '二级单位ID',
                    visible: false
                },
                {
                    field: 'ejdw_name',
                    title: '二级单位名称',
                    visible: false
                },
                {
                    field: 'zyq_id',
                    title: '作业区ID',
                    visible: false
                },
                {
                    field: 'zyq_name',
                    title: '作业区名称',
                    //visible: false
                },
                {
                    field: 'dw_3_id',
                    title: '点位3级ID',
                    visible: false
                },
                {
                    field: 'dw_3_name',
                    title: '点位3级名称',
                   // visible: false
                },
                {
                    field: 'dw_4_id',
                    title: '点位4级ID',
                    visible: false
                },
                {
                    field: 'dw_4_name',
                    title: '点位4级名称',
                    //visible: false
                },
                {
                    field: 'dw_5_id',
                    title: '点位5级ID',
                    visible: false
                },
                {
                    field: 'dw_5_name',
                    title: '点位5级名称',
                    //visible: false
                },
                {
                    field: 'deptId',
                    title: '单位ID',
                    visible: false
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>